package com.ruijixiang.leetcode.everyday.leetcode2024.leetcode202409;

public class leetcode20240905 {
    public String clearDigits(String s){
        StringBuilder st=new StringBuilder();
        for(char c : s.toCharArray()){
            if(Character.isDigit(c)){
                st.deleteCharAt(st.length()-1);
            }else{
                st.append(c);
            }
        }
        return st.toString();
    }
}
